package com.csu.petstore.service.Impl;

import com.csu.petstore.mapper.sysLogMapper;
import com.csu.petstore.pojo.logInfo;
import com.csu.petstore.service.logService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class logServiceImpl implements logService {
    @Autowired
    private sysLogMapper sysLogMapper;
    @Override
    public void saveLog(logInfo logInfo) {
        Date date = new Date(System.currentTimeMillis());
        logInfo.setInsertTime(date);
        logInfo.setUpdateTime(date);
        sysLogMapper.insert(logInfo);
    }
}
